#ifndef MAINUI_H
#define MAINUI_H

#include <QWidget>
#include <QTimer>
#include "ugui/ugui.h"

#define MAX_OBJECTS     2

namespace Ui {
	class MainUI;
}

class MainUI : public QWidget
{
	Q_OBJECT

public:
	static MainUI *obj;
	explicit MainUI(QWidget *parent = 0);
	~MainUI();

    void update_end(UG_U8 *buffer, UG_U16 w, UG_U16 h);

private slots:
    void update_gui();
	void on_btn_show_clicked();

    void on_pushButton_2_clicked();

private:
	Ui::MainUI *ui;
    QTimer update_timer;

	UG_GUI gui;
    UG_WINDOW window_1;
	UG_WINDOW window_2;
    UG_OBJECT obj_buff_wnd_1[MAX_OBJECTS];
    UG_OBJECT obj_buff_wnd_2[MAX_OBJECTS];


	UG_BUTTON button_1;
	UG_BUTTON button_2;
    UG_IMAGE image_1;
};

#endif // MAINUI_H
